{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "8ab0317f-2fff-4bc9-b16d-d9b652578ac1",
   "metadata": {},
   "source": [
    "Chapter 14\n",
    "# NumPy索引和切片\n",
    "Book_1《编程不难》 | 鸢尾花书：从加减乘除到机器学习  "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "b7fd0dce-2785-492d-8c71-40feddea5500",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 导入包\n",
    "import numpy as np\n",
    "import seaborn as sns\n",
    "import matplotlib.pyplot as plt\n",
    "import math\n",
    "from matplotlib import cm \n",
    "# 导入色谱\n",
    "\n",
    "import os\n",
    "\n",
    "# 如果文件夹不存在，创建文件夹\n",
    "if not os.path.isdir(\"Figures\"):\n",
    "    os.makedirs(\"Figures\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "0aa8b740-7ff9-48da-8773-7b97f3076b6e",
   "metadata": {},
   "source": [
    "## 定义可视化函数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "3987d0a0-9880-4bea-a3b4-22c7d040acb2",
   "metadata": {},
   "outputs": [],
   "source": [
    "def visualize_2D(array, title, vmax, vmin):\n",
    "    \n",
    "    fig_width  = math.ceil(array.shape[1] * 0.5)\n",
    "    fig_length = math.ceil(array.shape[0] * 0.5)\n",
    "    \n",
    "    fig, ax = plt.subplots(figsize=(fig_width, fig_length))\n",
    "    # 注意，seaborn.heatmap() 目前只能接受2D数组\n",
    "    # 本书中，一维数组可视化时用圆圈\n",
    "    # 可视化时，只有二维、三维数组用方块\n",
    "    \n",
    "    sns.heatmap(array, \n",
    "                vmax = vmax,\n",
    "                vmin = vmin,\n",
    "                annot = True,      # 增加注释\n",
    "                fmt = \".0f\",       # 注释数值的格式\n",
    "                square = True,     # 热图方格为正方形\n",
    "                cmap = 'RdYlBu_r', # 指定色谱\n",
    "                linewidths = .5,   # 方格线宽\n",
    "                cbar = False,      # 不显示色谱条\n",
    "                yticklabels=False, # 不显示纵轴标签\n",
    "                xticklabels=False, # 不显示横轴标签\n",
    "                ax = ax)           # 指定绘制热图的轴\n",
    "    \n",
    "    fig.savefig('Figures/' + title + '.svg', format='svg')\n",
    "\n",
    "# 定义绘制一元数组可视化函数\n",
    "\n",
    "def visualize_1D(array, title):\n",
    "    fig, ax = plt.subplots()\n",
    "\n",
    "    colors = cm.RdYlBu_r(np.linspace(0,1,len(array)))\n",
    "\n",
    "    for idx in range(len(array)):\n",
    "\n",
    "        circle_idx = plt.Circle((idx, 0), 0.5, facecolor=colors[idx], edgecolor = 'w')\n",
    "        ax.add_patch(circle_idx)\n",
    "        ax.text(idx, 0, s = str(array[idx]),\n",
    "                horizontalalignment = 'center',\n",
    "                verticalalignment = 'center')\n",
    "\n",
    "    ax.set_xlim(-0.6, 0.6 + len(array))\n",
    "    ax.set_ylim(-0.6, 0.6)\n",
    "    ax.set_aspect('equal', adjustable='box')\n",
    "    ax.axis('off')\n",
    "    fig.savefig('Figures/' + title + '.svg', format='svg')"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "29bf4f1a-003d-48bf-b5b1-49d03456ca31",
   "metadata": {},
   "source": [
    "## 一维数组"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "cb1204b2-1f67-47e5-8b6b-890e797d193d",
   "metadata": {},
   "source": [
    "### 定义一维数组"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "4c9059fe-5088-4073-906c-efed902bceee",
   "metadata": {},
   "outputs": [],
   "source": [
    "a_1D_array = np.arange(-5, 5 + 1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "6d1ea1c3-8818-454d-a5a3-fc7f634d8907",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(11,)"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "5eec0f37-9075-4eb5-b56b-d7250b44fa13",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array.ndim"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "e09b71c9-3360-4977-8b9d-1af18e1b7039",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "11"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(a_1D_array)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "c7b3785f-89ce-4da9-87ae-40ec5eb9f0c2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAgMAAABECAYAAAAcGTaqAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy88F64QAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAtg0lEQVR4nO2deZgcVbn/P6eqept9n+yZJJN1QoAkBAIEwyK7gCwqslwu4gaiIj8RRUCEq8hVwauCIIoLyCIBIopsKggJW0IgeyZ7JpOZZPa9l6pzfn9092TWzHRXdc9I6vM8eZ5Up/r0N7Wdb73nPe8RSimFi4uLi4uLy2GLNtICXFxcXFxcXEYW1wy4uLi4uLgc5rhmwMXFxcXF5TDHNQMuLi4uLi6HOa4ZcHFxcXFxOcxxzYCLi4uLi8thjmsGXFxcXFxcDnNcM+Di4uLi4nKY45oBFxcXFxeXwxzXDLi4uLi4uBzmuGbAxcXFxcXlMMc1Ay4uLi4uLoc5I2IGTFMiZe/1kSxL9tvu+1m6UEph9vltqVQ/zaYlGal1nqRSWH30yD5a1AD7pBOpVL/j03dbKtVPd7pQg+gbzmdpQylQsv9nQ+2TRpSyBjhmst9238/ShVIKJc3+n/XVLM0RO89KWijL6vdZ722Jsnr/P9KJikRQss957avZ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AMNFmj+6DLG3FDKmInxjUEo6agL6aYybgmAz7Hkb1bQTmndCx0BDMSJaQCh/MiJ/KkxajPDlOG4C+mm0TIRuYO3YgLX+LayqSmTV1oEjBoYHbfw0tIkz0MvnoR95YqxuhQORqcH0xTpXZUZoe/klOtesIrhxA6FtlagBQvR6fj7+2RX451SQfcrHCcyZizJNR01AX6RpohkGnXtr2fXY8zSsWk/j6vV07Nzbf2chyJ5eRsGCCgoXzWPK5efhK8pHmhZa34qhhyFpMQM9MU2Jpgk0TWBZkpraNjo6IpgRC6/PICfH12uhISClHeyAGi3ZvXZAMGyyv6mLUMQCBT6vTlGun8xYcRvTkuha6m7IgZBKgaJ7GKItGKE9ZBGJafHqGgWZ3u6OS6rk8hbsaowbD6kUnRELU0a1aJrApwkCsbH2+JTLVJqAgejZqUulMGOrNEK0OzW0g7kK8dsknee524V2r28QImoIZEyhDgRiQwwKULaHAxKXaBF9uxfRML3ZCiocMzQGaH6EkRXbN7bGQBo1KqVAWQgt2iGpSBd0NYIV68x0D2QUIoxotr+SZve+adMYW+Qobjxkcz10tKLMMOgGwpeBKCyNmhslQUrbwwEJa4xEQNcRmoYyTcLVe1FdndHO3ufHyC/AKIpO21amGRuySF8Hq5RCmSaaJ/pcjrS201lVi9nVBQiMjACZk8dhZEanecpwBM078gXKRhNpNwMuLi4uLi4uo4vDK13SxcXFxcXFpR+uGXBxcXFxcTnMcc2Ai4uLi4vLYY5rBlxcXFxcXA5zXDPg4uLi4uJymOOaARcXFxcXl8Mc1wy4uLi4uLgc5rhmwMXFxcXF5TDHNQMuLi4uLi6HOa4ZcHFxcXFxOcxxzYCLi4uLi8thjmsGXFxcXFxcDnNcM+Di4uLi4nKY8/8B4HzsZpEIIcYAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "visualize_1D(a_1D_array, '一维数组')"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b135100b-ce88-42cf-af5f-9f9a774191d5",
   "metadata": {},
   "source": [
    "### 索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "83620aa7-4a71-4a04-beab-d123ad34256f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "-5"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 第一个元素，索引为0\n",
    "a_1D_array[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "2069c661-71b7-4a9f-916c-2441375e9d51",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "-5"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[-11]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "dfcda765-e2ce-4a41-bb33-f414a5d780df",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "5"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 最后一个元素，索引为-1 或 len(a_1D_array) - 1\n",
    "a_1D_array[-1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "2efce5c6-e1f4-45c8-8299-c50242a093fe",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "5"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[len(a_1D_array) - 1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "a4261eba-3b64-4895-8d7f-6836513b4e21",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "5"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[10]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "cf275b2c-2c37-4ff9-80cd-56dfa2e2cd60",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "4"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 倒数第二个元素，索引为-2 或len(a_1D_array) - 2\n",
    "a_1D_array[-2]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "47a8ce99-bfae-4d99-b3a2-79d8eb7bc4de",
   "metadata": {},
   "source": [
    "### 行向量、列向量"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "4c4239ca-1fd9-46ba-b8e7-ee44651c4b19",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-5],\n",
       "       [-4],\n",
       "       [-3],\n",
       "       [-2],\n",
       "       [-1],\n",
       "       [ 0],\n",
       "       [ 1],\n",
       "       [ 2],\n",
       "       [ 3],\n",
       "       [ 4],\n",
       "       [ 5]])"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 转为列向量\n",
    "a_1D_array[:, np.newaxis]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "c00bff43-83a6-43e1-9f73-5ccad021c857",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAD0AAAHiCAYAAABbfcSnAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy88F64QAAAACXBIWXMAAA9hAAAPYQGoP6dpAAANM0lEQVR4nO2de1hUZR7Hv8PMOMNdAQU0QzAVBC+UixZobplZqY9pd1NT12u2PlurmebmWt6yrc0n7aZZbWllNzVsI0Jd0yQ1zUQUAgRhQGe4DjPDXM/+4TY2WjuSc96D/X6f5/GP9/V95vf78L7nHOY9P85RSZIkgRhBSiegBCxNBZamAktTgaWpQFJa05rB1w5cJ1ceAeO7/Nl+x5CcaZamA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Iq+ITEfzoGkDTDrDbYF+/BFJNhbD4ikhLZ0/DtmoGVMFhUPcfDN2D82Fb86gwcWUuWW4XJJMBntNFcG7fAE9VKbQ3jhUWvu1cpzVaYaGES2tHTkFQUhpUUbFQxSdCe8dkBPXoB9fBr4TlIPyYVoV3gG7CAqgiowCbBR5DGVpefgKek98Jy0G4tGPzP0SHvIi2c0wLhKWpwNJUYGkqsDQVWJoKLE0FlqYCSWmuGPRHYf9kufIIGClHTvgdQ3J5szQVWJoKLE0FlqYCS1OBpamgqHT0lOlIOXICsfOeEBpXMWl9ahraj7sHLSf9fxUMNIpIq4JD0Hn5c6heuhhuc5Pw+IpIxy38G5r37II1/xslwouvOYm49Xbok3vj1Pi7RIf2IlRaExuH2PkLUTFrKiSHQ2Ro3zxEBtP3ToUmOgaJmz7y9qk0GoRcOwAd7h2PExl9AY9H9jyESlvz96N03Cifvvily+EoK0XtxvVChAHB0h6rBfaSYt8+mw3uxoaL+uWE5G9kyha5A6j400ThMUnONEtTgaWpwNJUYGkqsDQVWJoKLE0FktJcMeiPTapecuURMB6QTvodQ3J5szQVWJoKLE0FlqYCS1OBpakg/P50n6fmoM+SR3z6bDVGfBKfJSwHRW7KNxwrQt6wyd625Bb3RmJAqYewudxoOWNSIjQAhaTDeyRgTNUeeOwO1OZ/jyMLn4elrFJY/FZtFwVi5yR+xBBoQvRoKjoFfWw00p6chYjkJGSnjoSjruGyP/9Sdk6ES1+IOiQYo0u+ROGz63HihTcv+/OuiO0it9WGhh+KEN6jm7CYiksHtdMiMqU7bNVGYTGFn8jSV89H1fadsFRUQ98pCmlPzoI2Igylb30iLAfh0iFXxeGGzc9DF9MedmM9TPuP4ItB98BaYRCWg3Dpvfc/KjrkRSh+TCsBS1OBpanA0lRgaSqwNBVYmgosTQWS0iQrBknONEtTgaWpwNJUYGkq/Be31gI3a60gowAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 100x600 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "visualize_2D(a_1D_array[:, np.newaxis], '列向量', 5, -5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "acc5b913-1640-41fc-a74c-c4fe89e1be4d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[:, np.newaxis].ndim"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "79f316fb-0ef7-404c-a4f4-ce5fddcbd295",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-5],\n",
       "       [-4],\n",
       "       [-3],\n",
       "       [-2],\n",
       "       [-1],\n",
       "       [ 0],\n",
       "       [ 1],\n",
       "       [ 2],\n",
       "       [ 3],\n",
       "       [ 4],\n",
       "       [ 5]])"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[:, None]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "88399755-f6b5-4ab0-bd16-b9e934a3d117",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-5],\n",
       "       [-4],\n",
       "       [-3],\n",
       "       [-2],\n",
       "       [-1],\n",
       "       [ 0],\n",
       "       [ 1],\n",
       "       [ 2],\n",
       "       [ 3],\n",
       "       [ 4],\n",
       "       [ 5]])"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array.reshape(-1,1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "915e76ce-2413-4c8f-8287-18d8dfdc40ba",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-5, -4, -3, -2, -1,  0,  1,  2,  3,  4,  5])"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[:, np.newaxis].squeeze()\n",
    "# 二维到一维"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "444d9c32-7f4c-4d67-92a4-7fa6bab2fbe4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-5, -4, -3, -2, -1,  0,  1,  2,  3,  4,  5]])"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 转为行向量\n",
    "a_1D_array[np.newaxis, :]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "563db4d9-8a94-4ea8-954a-8d907e7a8849",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAeQAAAA+CAYAAAD6fGgEAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy88F64QAAAACXBIWXMAAA9hAAAPYQGoP6dpAAALgUlEQVR4nO3deVhU5QIG8HeYgRl2WRTBBVFREFwwL1qocXNpUzPNFk1Nva4t3vTR1DTNNbOb6S1t0Wxzy1umiaURaq5kltdkEQMVFdAZdphhZpg5/eHT+IwMoN3i++y+v7/4Ps5w3j/mmfd855zhqBRFUUBERERCuYkOQERERCxkIiIiKbCQiYiIJMBCJiIikgALmYiISAIsZCIiIgmwkImIiCTAQiYiIpIAC5mIiEgCLGQiIiIJaG5l467d1/xZOf4wP6ZOQf8Zu0THuCl7VwzAjM9PiY5RrxVDOmHbmauiY9RrWPsmuFBhFh2jXuE+WkDZJzrGzVH9HcqFVaJT1EsVPhX2z8eIjlEvtyEbUPlcX9Ex6uW9OhkZXaJEx7gp0SczsUnVXnSMeg1XztS7DVfIREREEmAhExERSYCFTEREJAEWMhERkQRYyERERBJgIRMREUmAhUxERCQBFjIREZEEWMhEREQSYCETERFJgIVMREQkARYyERGRBFjIREREErilpz39kRbMuweDBjg/TeTn0wU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QiYiIJMBCJiIikgALmYiISAIsZCIiIgmwkImIiCTAQiYiIpKASlEURXQIIiKi/3dcIRMREUmAhUxERCQBFjIREZEEWMhEREQSYCETERFJgIVMREQkARYyERGRBFjIREREEmAhExERSeBXhWajk69MwQEAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 600x100 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "visualize_2D(a_1D_array[np.newaxis, :], '行向量', 5, -5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "ad20dbfa-6950-4fba-b190-46f331e5b8f3",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-5, -4, -3, -2, -1,  0,  1,  2,  3,  4,  5]])"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[None, :]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "464763cf-5ad6-4733-92a6-bb67f74cf42f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-5, -4, -3, -2, -1,  0,  1,  2,  3,  4,  5]])"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array.reshape(1,-1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "e4f67f0e-af7c-485f-86d4-f56dd0c83f17",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[110]])"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[np.newaxis, :] @ a_1D_array[:, np.newaxis]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "9b9362a2-0f39-4e0c-8703-574514f2ed73",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 25,  20,  15,  10,   5,   0,  -5, -10, -15, -20, -25],\n",
       "       [ 20,  16,  12,   8,   4,   0,  -4,  -8, -12, -16, -20],\n",
       "       [ 15,  12,   9,   6,   3,   0,  -3,  -6,  -9, -12, -15],\n",
       "       [ 10,   8,   6,   4,   2,   0,  -2,  -4,  -6,  -8, -10],\n",
       "       [  5,   4,   3,   2,   1,   0,  -1,  -2,  -3,  -4,  -5],\n",
       "       [  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0],\n",
       "       [ -5,  -4,  -3,  -2,  -1,   0,   1,   2,   3,   4,   5],\n",
       "       [-10,  -8,  -6,  -4,  -2,   0,   2,   4,   6,   8,  10],\n",
       "       [-15, -12,  -9,  -6,  -3,   0,   3,   6,   9,  12,  15],\n",
       "       [-20, -16, -12,  -8,  -4,   0,   4,   8,  12,  16,  20],\n",
       "       [-25, -20, -15, -10,  -5,   0,   5,  10,  15,  20,  25]])"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[:, np.newaxis] @ a_1D_array[np.newaxis, :]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "1152b829-bef5-45a6-9821-f1be7c68ef00",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[[-5]],\n",
       "\n",
       "       [[-4]],\n",
       "\n",
       "       [[-3]],\n",
       "\n",
       "       [[-2]],\n",
       "\n",
       "       [[-1]],\n",
       "\n",
       "       [[ 0]],\n",
       "\n",
       "       [[ 1]],\n",
       "\n",
       "       [[ 2]],\n",
       "\n",
       "       [[ 3]],\n",
       "\n",
       "       [[ 4]],\n",
       "\n",
       "       [[ 5]]])"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[:, np.newaxis, np.newaxis]\n",
    "# 三维"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "id": "17a38281-fb60-4736-89d9-36d343e50c49",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-5, -4, -3, -2, -1,  0,  1,  2,  3,  4,  5])"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[:, np.newaxis, np.newaxis].squeeze()\n",
    "# 从三维到一维"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b8ff04c9-f7be-43af-bb83-5e432ba22978",
   "metadata": {},
   "source": [
    "### 切片"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "5e71e92c-499f-4d35-adce-fd5f8eb834e0",
   "metadata": {},
   "source": [
    "#### 获取数组中的前三个元素"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "id": "fdb1a1ff-a34b-4114-b71b-7aae79ef51af",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-5, -4, -3])"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[:3]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "id": "1a922903-51d3-4a0d-96a9-e50ff0e0de86",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-5, -4, -3])"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[0:3]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "id": "79184273-b17d-4310-8a9e-bd78846758b3",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-5, -4, -3])"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[[0, 1, 2]]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2c138f46-ae8c-40e3-bf65-166a52abc70e",
   "metadata": {},
   "source": [
    "#### 获取数组中的第二个、三个元素"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "id": "d46bd427-3b1c-451a-be1e-3e6f220b9da3",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-4, -3])"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[1:3]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "id": "85ce30d4-fa49-4a00-a53a-501cfe7542cd",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-4, -3])"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[[1, 2]]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "3cec9555-f2e8-42db-b914-843b43b01ee8",
   "metadata": {},
   "source": [
    "#### 获取数组中的最后三个元素"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "id": "f0ca54fe-d0fa-482c-95f8-19ff13f0480d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([3, 4, 5])"
      ]
     },
     "execution_count": 33,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[-3:]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "id": "484bd3e7-5729-47ed-8970-3053f91a4bd7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([3, 4, 5])"
      ]
     },
     "execution_count": 34,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[8:]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "id": "2bcf1d49-cef6-43ab-9269-b4eaaef64fce",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "11"
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(a_1D_array)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "id": "40376de6-6d01-475f-8571-882e9a74e180",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([3, 4, 5])"
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[len(a_1D_array)-3:]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "id": "244dc89d-03dd-45d1-bed0-6cce95d25f30",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([3, 4, 5])"
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[[-3, -2, -1]]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f2ff92cc-ee66-466f-b2e2-735374285713",
   "metadata": {},
   "source": [
    "### 设定步长"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9920bbfd-7de1-48c7-a61c-0284a382bcd3",
   "metadata": {},
   "source": [
    "#### 取出所有奇数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "id": "29d71291-a59b-49ef-980d-314384d91d94",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-5, -3, -1,  1,  3,  5])"
      ]
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[::2]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "id": "bdbec598-17ed-4bfb-aac2-1f3616242923",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-5, -3, -1,  1,  3])"
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[0:-1:2]\n",
    "# 注意，这句代码取出的几个元素，包括第一个元素，但是不包括最后一个元素"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b72f17d5-fcd7-41ce-8ee1-a921a340e7c3",
   "metadata": {},
   "source": [
    "#### 取出所有偶数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "id": "f90abed7-3062-4015-bd68-5aa05ddbdab5",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-4, -2,  0,  2,  4])"
      ]
     },
     "execution_count": 40,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[1::2]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "be7e83bb-29df-4aa8-8986-d3db3a1bd870",
   "metadata": {},
   "source": [
    "#### 倒序"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "id": "b9cc92da-3cd9-4659-b348-21bec1ff5212",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 5,  4,  3,  2,  1,  0, -1, -2, -3, -4, -5])"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[::-1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "id": "58ae06f2-f4cd-4032-a6bf-55245cab2e34",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 5,  3,  1, -1, -3, -5])"
      ]
     },
     "execution_count": 42,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[::-2]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "id": "e13d5f2c-b8da-4cd4-833f-d7c8c59e5488",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 5,  4,  3,  2,  1,  0, -1, -2])"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[-1:2:-1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "id": "52e29253-c59e-4a76-bd97-66167cbc3f8c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 5,  3,  1, -1])"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[-1:2:-2]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d72b0728-3583-4a3a-bf2c-a4b3ae67c3a0",
   "metadata": {},
   "source": [
    "#### 其他步长设置"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "id": "64f06c3c-8c79-4adc-902e-5787655033e7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-5, -3, -1,  1])"
      ]
     },
     "execution_count": 45,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[:-3:2]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "id": "e365a279-7807-4c49-ba64-863ca78c19f0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-4, -2,  0,  2,  4])"
      ]
     },
     "execution_count": 46,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[1:-1:2]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "id": "7f2b98ed-1350-4bef-9ef2-b2d420557876",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-5, -2,  1,  4])"
      ]
     },
     "execution_count": 47,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[::3]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "id": "d7299624-2d8f-412a-af36-324ab9e6a63b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-4, -1,  2,  5])"
      ]
     },
     "execution_count": 48,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[1::3]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "14acc8dc-2a1d-469c-9bcb-497182a6ff17",
   "metadata": {},
   "source": [
    "### 整数索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "id": "07c1bed2-bf5f-47e8-bc35-775b192bded9",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-5, -4, -3,  5])"
      ]
     },
     "execution_count": 49,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 获取，第一、二 三，和最后一个元素\n",
    "a_1D_array[[0, 1, 2, -1]]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "id": "3164c899-21d6-43ef-8983-0f9db4e6d732",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-5, -4, -3,  5])"
      ]
     },
     "execution_count": 50,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[np.r_[0:3, -1]]\n",
    "\n",
    "# numpy.r_ 是一个用于将切片对象转换为一个沿着第一个轴堆叠的 NumPy 数组的函数。\n",
    "# 它可以在数组创建和索引时使用。\n",
    "# 它的作用类似于 numpy.concatenate 和 numpy.vstack，\n",
    "# 但是使用切片对象作为索引来方便快捷地创建数组。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "id": "7eeb2587-4203-406b-b636-e1482b1c0492",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-5, -4, -3,  5])"
      ]
     },
     "execution_count": 51,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 或者采用合并\n",
    "first_three = a_1D_array[:3]   # 获取前三个元素\n",
    "last_one    = a_1D_array[-1:]  # 获取最后一个元素\n",
    "np.concatenate((first_three[:3], last_one[-1:]))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "17b58d13-d52e-4dc9-a129-8cdfb0460462",
   "metadata": {},
   "source": [
    "### 布尔索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "id": "8fc3df49-8c2d-4ae1-9269-ac508e06d81a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([False, False, False, False, False, False, False,  True,  True,\n",
       "        True,  True])"
      ]
     },
     "execution_count": 52,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 大于 1 的元素\n",
    "bool_greater_than_1 = a_1D_array > 1\n",
    "bool_greater_than_1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "id": "63886bf8-5e24-4d31-aed5-fbec2949f20c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([2, 3, 4, 5])"
      ]
     },
     "execution_count": 53,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[bool_greater_than_1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "id": "fc2fef85-eff1-44e8-9736-5e6fe9658155",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([2, 3, 4, 5])"
      ]
     },
     "execution_count": 54,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[a_1D_array > 1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "id": "103a629c-561c-4872-8d77-147023e7fc4a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([False, False, False, False, False,  True,  True,  True,  True,\n",
       "        True,  True])"
      ]
     },
     "execution_count": 55,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 大于等于 0 的元素\n",
    "bool_greater_than_eq_0 = a_1D_array >= 0\n",
    "bool_greater_than_eq_0"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "id": "27a3c1a8-40c5-449e-9a16-ff0244b11653",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0, 1, 2, 3, 4, 5])"
      ]
     },
     "execution_count": 56,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[bool_greater_than_eq_0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "id": "91b3763e-7c51-405a-90c6-70d7977d2ef1",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0, 1, 2, 3, 4, 5])"
      ]
     },
     "execution_count": 57,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[a_1D_array >= 0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "id": "9b854afb-6fbd-442e-8e92-1cf47a9d66e8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ True,  True,  True,  True,  True, False, False, False, False,\n",
       "       False, False])"
      ]
     },
     "execution_count": 58,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 小于 0 的元素\n",
    "bool_less_than_0 = a_1D_array < 0\n",
    "bool_less_than_0"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 59,
   "id": "fac5b10a-e9cd-4354-8fa1-9b2f73fc4b9c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-5, -4, -3, -2, -1])"
      ]
     },
     "execution_count": 59,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[bool_less_than_0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "id": "7946cb99-f75f-41d0-b55a-fc3ca86523d1",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-5, -4, -3, -2, -1])"
      ]
     },
     "execution_count": 60,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[a_1D_array < 0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "id": "22ae208c-b173-4297-9330-583f3c9e46eb",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ True,  True,  True,  True,  True,  True, False, False, False,\n",
       "       False, False])"
      ]
     },
     "execution_count": 61,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bool_less_than_eq_0 = a_1D_array <= 0\n",
    "bool_less_than_eq_0"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 62,
   "id": "8d7a2145-dba3-437b-9049-6e59f90e2bb9",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-5, -4, -3, -2, -1,  0])"
      ]
     },
     "execution_count": 62,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[bool_less_than_eq_0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 63,
   "id": "6e2f416e-12c1-4092-b681-83d916cba86b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-5, -4, -3, -2, -1,  0])"
      ]
     },
     "execution_count": 63,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[a_1D_array <= 0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 64,
   "id": "585f7b25-67c2-43d4-a24e-715c932e1885",
   "metadata": {},
   "outputs": [],
   "source": [
    "### 大于-3，小于3的元素"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 65,
   "id": "b9640ea7-a7e5-4116-b98d-821cee66e10b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-2, -1,  0,  1,  2])"
      ]
     },
     "execution_count": 65,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array[(a_1D_array < 3) & (a_1D_array > -3)]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 66,
   "id": "2cbad4e8-f16f-4744-9549-e417211bcd04",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([100, 100, 100, 100, 100, 100,   1,   2,   3,   4,   5])"
      ]
     },
     "execution_count": 66,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array_copy_1 = np.copy(a_1D_array)\n",
    "\n",
    "a_1D_array_copy_1[a_1D_array_copy_1 <= 0] = 100\n",
    "a_1D_array_copy_1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 67,
   "id": "60e1ac6d-3357-453b-843d-cc829c88371c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ -5,  -4,  -3, 100, 100, 100, 100, 100,   3,   4,   5])"
      ]
     },
     "execution_count": 67,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1D_array_copy_2 = np.copy(a_1D_array)\n",
    "a_1D_array_copy_2[(a_1D_array_copy_2 < 3) & (a_1D_array_copy_2 > -3)] = 100\n",
    "a_1D_array_copy_2"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "0c1884bd-53ed-4a8e-9dca-cfee0cdc7086",
   "metadata": {},
   "source": [
    "## 视图 vs 副本"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 68,
   "id": "7253dfa7-bf19-4c16-a204-3b9fdcc3b5bd",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[   1 1000    3    4    5]\n",
      "[   1 1000    3    4    5]\n",
      "[888   4]\n"
     ]
    }
   ],
   "source": [
    "# 创建一个一维数组\n",
    "a = np.array([1, 2, 3, 4, 5])\n",
    "\n",
    "# 创建一个切片视图\n",
    "s = a[1:3]\n",
    "\n",
    "# 修改视图中的数据\n",
    "s[0] = 1000\n",
    "\n",
    "# 查看原始数组\n",
    "print(a) # 输出：[1 0 3 4 5]\n",
    "\n",
    "# 创建一个整数数组索引副本\n",
    "c = a[[1, 3]].copy()\n",
    "\n",
    "# 修改副本中的数据\n",
    "c[0] = 888\n",
    "\n",
    "# 查看原始数组\n",
    "print(a) # 输出：[1 0 3 4 5]\n",
    "print(c)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 69,
   "id": "41836ae2-121e-4912-8b04-9accb425596b",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[1000    2    3]\n",
      " [   4    5    6]\n",
      " [   7    8    9]]\n"
     ]
    }
   ],
   "source": [
    "# 创建一个3x3的数组\n",
    "a = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]])\n",
    "\n",
    "# 使用a[:, np.newaxis]创建一个新的视图\n",
    "b = a[:, np.newaxis]\n",
    "\n",
    "# 修改b中的值\n",
    "b[0, 0, 0] = 1000\n",
    "\n",
    "# 打印原始数组a\n",
    "print(a)\n",
    "\n",
    "# a[:, numpy.newaxis] 返回的是原始数组的一个视图，而不是副本\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "134e99a5-8931-4dd0-8878-f401d952d7a0",
   "metadata": {},
   "source": [
    "## 二维数组"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "4debd799-d8be-479c-818e-51f1d7eb1317",
   "metadata": {},
   "source": [
    "### 定义二维数组"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 70,
   "id": "01a2fb66-3ccf-44a3-83f8-800e2d594a2b",
   "metadata": {},
   "outputs": [],
   "source": [
    "A_2D = np.array([[-7,-6,-5,-4,-3],\n",
    "                 [-2,-1, 0, 1, 2],\n",
    "                 [ 3, 4, 5, 6, 7]])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 71,
   "id": "59e1ef1b-ec18-4f64-a229-7790c9550737",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAPwAAACfCAYAAADdy7STAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy88F64QAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAQSUlEQVR4nO3deVTU9cLH8c8wrMO+yCqICqiImqVlSqiJWd6rt2uLW6fc0rTVfFKD0sy8WjcrH22hwqw0rUytFEvTNNHrgqAJIiCKKPu+Dctszx/3ND5TCTMcne/Y9/M6x3P6/pzyc+q8ZzNnFAaDwQAikoKd6AFEZD0MnkgiDJ5IIgyeSCIMnkgiDJ5IIgyeSCIMnkgiDJ5IIgyeSCL2ltz41jveu1E7bqj0Y/MwYuZW0TMsdiD5QUxefVD0jE7ZvGA4Er/PEj3DYivG9cXGzBLRMzrlkZigDm/DR3giiTB4IokweCKJMHgiiTB4IokweCKJMHgiiTB4IokweCKJMHgiiTB4IokweCKJMHgiiTB4IokweCKJWPTn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P9nLHtiX5oaNFiz9lqJOzIx6fT+th09ApPPziOfwItHycAWo3oORZpSTti/Gst8lGZ/SsCk3dAFf93NG7fJHBZBxQKNGVm4crqtwEA6rPZcImMgP+UyTdV8D1nPoCS3b+guaRc2AahwTsq7dDNxxkAEBPshsziJnx+tAzLxnUXOatddl0joXD3hvMz64zXFEol7LrHwH7oeDQnjAMMeoELzWdobYHmUj7sg0NFT2mXpqICzXnnTa41n8+Hz5h7BC2ynCosGAHxQ3FowtNCdwgN/vcMADQ6245Fd/4UmlfPMbnm+PACGMovQ3Pgq5smdgCAvQPsQ8PRmmnb70M0nMyAcw/TBwHn7uFoLS4WtMhyPadPQGt5FYp3HRC6Q1jwb++7jLsiPBHk6YSmVh1SMqtwoqAeH0618c8yb22GoeyS6bW2FhjU9X+8bmM8Zz6L5mOHoKsohdLLG+6TZsJO5Qr1vp2ip7WrdP0GRH+9GcFz56AqZTfc+veH/6SHcTFxiehp5lEo0GP6BFz4dAcMgn8bVFjwVY0aLN6ej4pGDdydlIgKUOHDqb0xtKenqEl/eUq/APguWgE7Dy/o62rQmpOJ8vnToSsvFT2tXU1nMpE392mEvvA8Qp6eh9bLV3DptZWo+s6276h+Exg/FK7dQnBB4LvzvxEW/Gv/6CHql77uWpMWip5glurXEzq+kY2q/fkAan8+IHpGp5TuPWwz32ZjE78PT0TWweCJJMLgiSTC4IkkwuCJJMLgiSTC4IkkwuCJJMLgiSTC4IkkwuCJJMLgiSTC4IkkwuCJJMLgiSTC4IkkwuCJJMLgiSSiMBgMBtEjiMg6+AhPJBEGTyQRBk8kEQZPJBEGTyQRBk8kEQZPJBEGTyQRBk8kkf8DOOb2Ujs3wb8AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 300x200 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "visualize_2D(A_2D, '二维数组', 7, -7)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "1ca9e07c-b4ea-4959-aaa7-799e69e01e03",
   "metadata": {},
   "source": [
    "### 索引"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f056cf80-d1b2-41d8-ba0e-4c23040f5055",
   "metadata": {},
   "source": [
    "#### 取出单一元素"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 72,
   "id": "0de2fcad-26cf-4d86-90fe-03305540c110",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "-7"
      ]
     },
     "execution_count": 72,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_2D[0, 0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 73,
   "id": "2631a0bc-5c17-4d26-a438-cd1c7e8fb6b6",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "numpy.int32"
      ]
     },
     "execution_count": 73,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(A_2D[0, 0])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 74,
   "id": "bd8cd1b4-7e68-4596-922a-535f076aa486",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-7])"
      ]
     },
     "execution_count": 74,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_2D[[0], [0]]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 75,
   "id": "21a9a017-0604-4820-9331-74ff006d3766",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "numpy.ndarray"
      ]
     },
     "execution_count": 75,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(A_2D[[0], [0]])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 76,
   "id": "7a7d56d4-42d7-4479-b518-0fb5f2b2cb67",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0"
      ]
     },
     "execution_count": 76,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_2D[1,2]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 77,
   "id": "b8c91005-30d0-4c60-ac5f-2555f80e8b45",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0])"
      ]
     },
     "execution_count": 77,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_2D[[1], [2]]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 78,
   "id": "9551adbd-37f4-4095-88ec-35e155cd6c73",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0"
      ]
     },
     "execution_count": 78,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_2D[1][2]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "5e6f698a-45e7-4671-8414-3efc6be45c20",
   "metadata": {},
   "source": [
    "#### 取出行"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 79,
   "id": "c1027fa5-4f97-4420-80b4-c68a895e9da4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-7, -6, -5, -4, -3])"
      ]
     },
     "execution_count": 79,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 取出第一行，结果为一维向量\n",
    "A_2D[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 120,
   "id": "838d065d-1745-4f34-9711-b2e4404dd8a3",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-7, -6, -5, -4, -3])"
      ]
     },
     "execution_count": 120,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_2D[0, :]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 80,
   "id": "2b497f5c-ad97-4d04-9046-75489a98c08b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-2, -1,  0,  1,  2])"
      ]
     },
     "execution_count": 80,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_2D[1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 121,
   "id": "934137ab-6eef-41af-b4eb-f21c3c081eb5",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-2, -1,  0,  1,  2])"
      ]
     },
     "execution_count": 121,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_2D[1, :]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 81,
   "id": "e2390f12-b026-412d-a522-e9d94d44882a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7, -6, -5, -4, -3]])"
      ]
     },
     "execution_count": 81,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 取出第一行，结果为二维行向量\n",
    "A_2D[[0],:]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 82,
   "id": "815068be-7643-4f22-9d4b-faa0ea9b7e18",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7, -6, -5, -4, -3]])"
      ]
     },
     "execution_count": 82,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_2D[0, np.newaxis]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 118,
   "id": "b2dfe161-9ee1-43af-8dd5-696d09655c4d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7, -6, -5, -4, -3],\n",
       "       [ 3,  4,  5,  6,  7]])"
      ]
     },
     "execution_count": 118,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_2D[[0, 2]]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 116,
   "id": "3c0d7d6a-dbbb-4c5e-973c-b76a5eae0f8c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7, -6, -5, -4, -3],\n",
       "       [ 3,  4,  5,  6,  7]])"
      ]
     },
     "execution_count": 116,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_2D[[0, 2], :]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e92f7c81-14dd-493a-9407-7e3c89f54a32",
   "metadata": {},
   "source": [
    "#### 取出列"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 85,
   "id": "17ba046e-11aa-4fd6-abe2-56ae8d3f1768",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-7, -2,  3])"
      ]
     },
     "execution_count": 85,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_2D[:,0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 138,
   "id": "49ad6591-8cbd-49f1-a5ce-056a2fc5232d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-7, -2,  3])"
      ]
     },
     "execution_count": 138,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_2D[...,0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 122,
   "id": "bd572c1d-72ef-47b6-b652-7a472f391a06",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7],\n",
       "       [-2],\n",
       "       [ 3]])"
      ]
     },
     "execution_count": 122,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_2D[:,0, np.newaxis]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 87,
   "id": "bbb94eda-aaa8-495d-ad3e-60ef6ba687dd",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7],\n",
       "       [-2],\n",
       "       [ 3]])"
      ]
     },
     "execution_count": 87,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_2D[:,[0]]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 127,
   "id": "ed2f7d08-336d-4d92-8496-0bd551ebc3ee",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7, -2,  3]])"
      ]
     },
     "execution_count": 127,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_2D[np.newaxis, :,0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 88,
   "id": "f50d5e49-ce17-4fca-8384-a579d357791d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-6, -1,  4])"
      ]
     },
     "execution_count": 88,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_2D[:,1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 89,
   "id": "5da4c9e6-c533-4248-876f-8a6894e334c2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7, -5, -3],\n",
       "       [-2,  0,  2],\n",
       "       [ 3,  5,  7]])"
      ]
     },
     "execution_count": 89,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_2D[:,[0,2,4]]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 123,
   "id": "fd7e7b74-89ba-4eae-b9fd-358f8f5ca4c7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7, -5, -3],\n",
       "       [-2,  0,  2],\n",
       "       [ 3,  5,  7]])"
      ]
     },
     "execution_count": 123,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_2D[:,0::2]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f18e7177-7025-4e3d-9f34-2393ef0740d6",
   "metadata": {},
   "source": [
    "#### 取出特定行列组合"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 130,
   "id": "d4761317-f5a6-46c4-aefa-7071df5d6514",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0, 1, 2])"
      ]
     },
     "execution_count": 130,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_2D[1,2::]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 131,
   "id": "0f13b37c-2643-4cc4-bb15-7ed6c00371af",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[0, 1, 2]])"
      ]
     },
     "execution_count": 131,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_2D[np.newaxis, 1,2::]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 132,
   "id": "1fa43247-30cf-4468-98c3-9cb92c20411d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[0],\n",
       "       [1],\n",
       "       [2]])"
      ]
     },
     "execution_count": 132,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_2D[1,2::, np.newaxis]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 134,
   "id": "875df8e3-d015-467b-b2bc-2d8ebf2f2dad",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-2,  0,  2],\n",
       "       [ 3,  5,  7]])"
      ]
     },
     "execution_count": 134,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_2D[1::,[0,2,4]]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 133,
   "id": "7563650c-a1f2-4036-ab66-c53af3ebe46d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-2,  0,  2],\n",
       "       [ 3,  5,  7]])"
      ]
     },
     "execution_count": 133,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_2D[1::,0::2]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 136,
   "id": "c2c5cf27-3657-402e-b52f-176fa6b6fc47",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7, -5],\n",
       "       [ 3,  5]])"
      ]
     },
     "execution_count": 136,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_2D[::2,:-1:2]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 93,
   "id": "76807339-7898-4d29-86d9-c5798f1eef57",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7, -5],\n",
       "       [ 3,  5]])"
      ]
     },
     "execution_count": 93,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 二次切片\n",
    "A_2D[:,[0,2]][[0, 2], :]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 94,
   "id": "8433b3b5-a9a0-4b47-b6a4-add076909b9d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7, -5],\n",
       "       [ 3,  5]])"
      ]
     },
     "execution_count": 94,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_2D[[0, 2], :][:,[0,2]]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f413fde4-e19a-47e4-84b4-18b08e7d8873",
   "metadata": {},
   "source": [
    "#### 使用np.ix_()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 95,
   "id": "3055193d-09b5-4aa5-b915-8c3a6b820c07",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-7, -5],\n",
       "       [ 3,  5]])"
      ]
     },
     "execution_count": 95,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_2D[np.ix_([0, 2], [0, 2])]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "6e2d7b90-cd10-4a1f-9412-9da6ef27c65c",
   "metadata": {},
   "source": [
    "### 布尔索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 96,
   "id": "b863a4f3-35b4-4600-8f71-45b4e817f147",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[False, False, False, False, False],\n",
       "       [False, False, False,  True,  True],\n",
       "       [ True,  True,  True,  True,  True]])"
      ]
     },
     "execution_count": 96,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_2D > 0"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 137,
   "id": "a8a708d3-8070-4fe6-9239-dd0afd6bf0fe",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1, 2, 3, 4, 5, 6, 7])"
      ]
     },
     "execution_count": 137,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_2D[A_2D > 0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 97,
   "id": "5b06fc8b-8930-4568-9eba-c1a59bfbc846",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[1],\n",
       "       [2],\n",
       "       [3],\n",
       "       [4],\n",
       "       [5],\n",
       "       [6],\n",
       "       [7]])"
      ]
     },
     "execution_count": 97,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_2D[A_2D > 0, np.newaxis]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 98,
   "id": "fbb9d558-c44d-47d7-a161-a34671394359",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[1, 2, 3, 4, 5, 6, 7]])"
      ]
     },
     "execution_count": 98,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_2D[np.newaxis, A_2D > 0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 99,
   "id": "43201add-7e8f-433b-9885-2f0b21b47147",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ True,  True,  True,  True,  True],\n",
       "       [ True,  True,  True,  True,  True],\n",
       "       [ True, False, False, False, False]])"
      ]
     },
     "execution_count": 99,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_2D < 4"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 100,
   "id": "7c527831-25ae-4569-819a-9bc74d5a6ed6",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "7"
      ]
     },
     "execution_count": 100,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(A_2D > 0).sum()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "fcce04be-9fdf-4694-ac79-aeef929e885a",
   "metadata": {},
   "source": [
    "## 三维数组"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 101,
   "id": "cc5dccfb-8655-4f28-b715-ec6d587617a6",
   "metadata": {},
   "outputs": [],
   "source": [
    "### 生成三维数组"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 102,
   "id": "3cb6b19f-78c7-46aa-9562-3cdb9bc78412",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[[-30, -29, -28, -27, -26],\n",
       "        [-25, -24, -23, -22, -21],\n",
       "        [-20, -19, -18, -17, -16],\n",
       "        [-15, -14, -13, -12, -11]],\n",
       "\n",
       "       [[-10,  -9,  -8,  -7,  -6],\n",
       "        [ -5,  -4,  -3,  -2,  -1],\n",
       "        [  0,   1,   2,   3,   4],\n",
       "        [  5,   6,   7,   8,   9]],\n",
       "\n",
       "       [[ 10,  11,  12,  13,  14],\n",
       "        [ 15,  16,  17,  18,  19],\n",
       "        [ 20,  21,  22,  23,  24],\n",
       "        [ 25,  26,  27,  28,  29]]])"
      ]
     },
     "execution_count": 102,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_3D = np.arange(-30, 30).reshape(3,4,5)\n",
    "A_3D"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 103,
   "id": "b09f9095-bc85-478c-9ffd-de1134536d23",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAANQAAACuCAYAAABOZyO/AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy88F64QAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAjMElEQVR4nO3deVSUdf//8efMMDMM+74ICIK4gPuCu2aZtrmUmaVZWaaWdpeapa1m2uJ2Z2l7me2WmXepue+KipqCosgiIqDs62ysvz8GBkfRJD+j3/M7n8c5nuM1c13wEnjNteBcb0VtbW0tkiQJobzVASTp/yeyUJIkkCyUJAkkCyVJAslCSZJAslCSJJAslCQJJAslSQLJQkmSQLJQkiSQQ1NW7tLjY3vl+NeO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ahvTl5BWDbncvH2ve1uzwcDKOS+i0ekY88p8VA5iD4Sie/aleZto67J7E7LZm9B/qUbnJOS8pzDrHDXVVTgLukjxb3LFDH2Y9rfdbfPYytkTue3RyUR07ikkF4BW54RW0LlibW0tVZWVQj6W1skJrVPTc5kMela+OQOVWs2jr72HWiP+aq2jkzOOTs7CP64Idj+HMpWXUV6Yi77Ycp+AoouZADi5e+Lk7kVJbjZnDuwgtEN3HF3cKco+x75fvsSneQQBkVHX+tA3xFheSllBLuVFllyFFyy5nN29cPZo+HM5V28/3P3ETQ1vNFtZKSX5uZQX5VuyZVvumeHi4YWLpxdFOdkk7t9BeIduOLl5UFaYT+z/fkKt0dKySw+75TKUlVKSl0NpoSVXflZdLk8vXD29MRsMfPPGdCrNJsZMfx2zQY/ZoAfA2c3DbpfzAfRlpRTnXqSkwJItN9OSzdXTGzcvy5FSaWEBZUUF5GdbvtcX0lPR6pzw8AvA2dVNSA67Fyr92AG2r2g4R9jymeV3BN2GjSVm+KMoHdRknTpG/Nb/UWk24uLlS2j7GLoPG4tSab9vQOrRWDZ93nCOsH7ZfAB63T+O3iMfs9vnvR5nDu9n3cfvW5d//+BtAPqNepz+Dz2Bg1rD+VMJxK3/DWN5Gc4enjRv24HH532Es7un3XKdPrSXNUvftS6vWjgHgIEPj+eOMU+SlZpE5hnLdPn/TnrYZtsZX/yCp7/9XohOxu7h5yXzrcvfvfsGAIPHPsld4yYAsH/972z+4WvrOstefBaAh6e/Sszge4XkaNJtxORdj5pG3vWo6eRdjyRJspKFkiSBZKEkSSBZKEkSSBZKkgSShZIkgWShJEkgWShJEkgWSpIEkoWSJIFkoSRJIFkoSRJIFkqSBJKFkiSB5BR4SRJI7qEkSSBZKEkSSBZKkgSShZIkgWShJEkgWShJEkgWSpIEkoWSJIFkoSRJoP8HKVPxvG8u93AAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 300x200 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "visualize_2D(A_3D[0], '三维数组，第1页', 30, -30)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 104,
   "id": "114b497f-b11a-45c5-ad72-7cd2ac90733b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAANQAAACuCAYAAABOZyO/AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy88F64QAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAWjUlEQVR4nO3deXzNV/7H8VdWsslOIggRsgkiscUSa4saLaqlhlGqKC1qaWmnoyihlp9aY4sqVWoroiqW1l5rawlKEUs0iewRZLu/Pzx6iQSNOff7NTOf53/nm5t73g/y9l3inmNmMBgMCCGUMNc7gBD/TaRQQigkhRJCISmUEApJoYRQSAolhEJSKCEUkkIJoZAUSgiFpFBCKGRZmhfvupZmqhzPrFVlZw7czNA7RonCPR05npytd4xi6rnbcz79jt4xSuTnZEN89j29YxTjbV/mL71OzlBCKCSFEkIhKZQQCkmhhFBICiWEQlIoIRSSQgmhkBRKCIWkUEIoJIUSQiEplBAKler/8j2LE3t3s3fLRq5eOMftzAzGLlhOZd+aRV6Tl5vL+qgvOLI7lrzce/iFhNHjvdE4u5c3dTyjjNQUvo2aw5mjP5OTnUXN2iH0HDoSj0pVNMvwOHdzcli1YDZH9/5IVkYG7p6etHu1O207d9M1V6eGdUs83mfIMLr06qNplpJcvXyJxV/M5OSxYxgMhXj7VOfjyGmU9/Q02ZwmL1Tu3btUr1WbehGtWDljcomv+XbeTE4d2ke/jyZgX86RtVFfMO/jEYyZtwxzCwtTR8RgMDD741FYWFry7mfTsLG144dvv2baiCF8tmw1ZWxsTJ7hSZbPnk7c8aMM/ucE3D0rcvLwIZbOiMTZzZ2wZi10y/Xl1h1FxscO7GP2Z58S3qqNTokeSLh2jeH9/kG7lzvTe8A72Nk7cPXyJazKWJt0XpMXqmH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VFhoYMPO33ilVQ0sLZ6P38O3rOfFgo1n8HSzxbeSI2evpLEs5jxdW+h/dgLYdyoRg8FANU8H4hOzmbb6NNU87OnczNvkc2tWqMTkLEZM3Ep6xh2cnWyoE+DJ6rnd8dL5EXWwXwVm/6sdM5YeYt6Ko1TycGDMoKb8rXVNXXP96cCvN0hIvk2XNs9HHoCP3wzlizUnGb/0KCkZ9yjvbMPrbXx5p6tpH0n/VVk5ecz89gx/pN3B0c6KF8K8GPZqEFaWpv8HqVTLiMmqR6Ujqx6Vnqx6JIQwkkIJoZAUSgiFpFBCKCSFEkIhKZQQCkmhhFBICiWEQlIoIRSSQgmhkBRKCIWkUEIoJIUSQiEplBAKyS7wQigkZyghFJJCCaGQFEoIhaRQQigkhRJCISmUEApJoYRQSAolhEJSKCEU+n+lkPC0eAdrHQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 300x200 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "visualize_2D(A_3D[1], '三维数组，第2页', 30, -30)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 105,
   "id": "a1ba7370-6ca4-4a32-ba9a-db0abd2f19cc",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAANQAAACuCAYAAABOZyO/AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy88F64QAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAeDElEQVR4nO3dZ3xUZf7+8c/UTHpPgARCIBA6FsACKF1UFEVQRKQXQSwICkgAZRUrNhZdFbHCrrrYBQVlV0SKhiYJNZSEJIT0Nkmmnfk/GEgYE4TIOQn7/33fj5g598y5XsNcOW1mbp3b7XYjhFCFvrEDCPH/EymUECqSQgmhIimUECqSQgmhIimUECqSQgmhIimUECqSQgmhIimUECoy1mew8t9HtMrxl+n7vITy3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yuuV5+x11ee0+U3FdWfbM30uWas92cxREbRb9AgRfXthCg2m8kQ2J97/mGPL36tXtvqcNj/XqezkyXPJ+MiTq/X0e2kzcyKWqHCqcvLIWPUl+595vd7XPC/0tHmDXIfSkvzqUf3Jrx7V3yV1HUqI/yukUEKoSAolhIqkUEKoSAolhIqkUEKoSAolhIqkUEKoSAolhIqkUEKoSAolhIqkUEKoSAolhIqkUEKoSGaBF0JFsoUSQkVSKCFUJIUSQkVSKCFUJIUSQkVSKCFUJIUSQkVSKCFUJIUSQkX/D8Qh9Traw4A3AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 300x200 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "visualize_2D(A_3D[2], '三维数组，第3页', 30, -30)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 106,
   "id": "11964061-9763-4ba7-ac40-bb033b9740f1",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAPwAAACfCAYAAADdy7STAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy88F64QAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAYbUlEQVR4nO3dd2BT9d7H8Xea7nTvAZRSoLTsVfZSBFSQ4fW5KrJEZMsSAeWqIMgQUUB4xMHQC4qA4wqK7C1QKLPMMlraCt0r6UjbPH+0BINllIckvZ7v67/fOb+ED20//Z0BOSqDwWBACKEINtYOIISwHCm8EAoihRdCQaTwQiiIFF4IBZHCC6EgUnghFEQKL4SCSOGFUBApvBAKYluZyc1aLTNXDrOKOTyKll0+t3aMSoveNYzWT6+ydoyHcmjzYNo9t8baMSrtwPr+dBqy3toxHsqelc/dd46s8EIoiBReCAWRwguhIFJ4IRRECi+EgkjhhVAQKbwQCiKFF0JBpPBCKIgUXggFkcILoSBSeCEURAovhIJI4YVQECm8E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rUo1Jcwc+0Z4z+8+WJcKzRWPsSMTchl0CcxxvG8Hy8B0CcqkDn9I9l1JpU3196+dz1pddnh2ugeoYx50rrnw7FJeQz6PNY4nrf5GgB9mvkypmt1dp4ruwPSd/FJk9etHlafqFrWu70Vm6xlyNfnjeP52xIA6N3Ih3eersnVtAJ+OnWJTF0xHk62NAjS8NXgCGr7Wf8q/ZmbOl5eH2ccz9+TBEDvSC9m3+XfFVhSpR41JU+esSx58ozlyZNnhBB/G1J4IRRECi+EgkjhhVAQKbwQCiKFF0JBpPBCKIgUXggFkcILoSBSeCEURAovhIJI4YVQECm8EAoihRdCQaTwQiiIFF4IBZHCC6EgUnghFKRSH3ElhPjvJiu8EAoihRdCQaTwQiiIFF4IBZHCC6EgUnghFEQKL4SCSOGFUBApvBAK8n+KzF8ZUGDHqwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 300x200 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "visualize_2D(A_3D[:,0,:], '三维数组，第1行', 30, -30)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 107,
   "id": "a1bbdc39-6655-4713-96a7-77dd81b01d1d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAK8AAACICAYAAACRO7v7AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy88F64QAAAACXBIWXMAAA9hAAAPYQGoP6dpAAATlklEQVR4nO3deXhTVf7H8XfWNumSLinQBcrSAi370oJssgiow7CIIsiIICI6Ig7gTxBUHGAERkERAWEQkFEc3AZHBJRNZF8GGLYCLdBCW6B70qZNs/7+iAYC1YLmtnPnOa/n4Xl6Ts5NvqQfTk8vufco3G63G0GQIWVtFyAIv5YIryBbIryCbInwCrIlwivIlgivIFsivIJsifAKsiXCK8iWCK8gW+q7Gdy+01Kp6vh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0dKsnyoXb3YbtlOyY3oLi1sxa4zu31fu0uvIzr+gW0495H2agDroyDNVJD8JgpqOMTKJlZxV3Cb7tyS1FFn3TiXn2VwGbNSB/5mE9/yebN3q+t6emUnz5Fi23bCe3ZE9PWrX6vo1aWDcZQz847BaZKn/6iUhuRoTW/WV+1LMWeWTg8pkZeLnj0JLQdu1EyawKuonxvv6vEM+Mqw3z3o1Aawm+bjaUSN+MVDL16k/HEKOzXr//iWEd+PraruQTES/M7TK2EN86owxgawL60Gwt7m8PF4fOFtGsSXhsl/bLAYBQhRtwW6dfjwWMmo03tiWn287jyr/o85srLxVlcgKbVTbskqdRoktpiP39S8triXnkVQ9++ZIwZjS0np9rxqrAwtPWiceTnVzv215Bs2WCxOricb/G2swvKSbtiwhCkJSZCx6g+jVixOYP4OkHE1wlixeYMArUqBqTGSlXSDZpAFGE31oiK0DooohritpaBtQxVl0c9a15LMYrQOqi7j4SKUlzpByQtK/jJFwno2hfzW1NxVZSjMHjWuO7yMrDbAKjY/Cn6waNwXruC82o2+iGjcFdaqdzr/x/LN4t77TXCfzeASxOew2mxoP5xbzpnaSnuykqUej31nptAydbvcOTlo42NJXrSJBzFxZRs3SZJTZKF93SWiScW3vhmz//MsxHe4HvimDu6DU/1b0yl3cmsdae8/0mx8oVOkp/jBVDUbYL20dnetrrXkwA4T+3AsX0FSmMDVMk9IUAPlhJcl09i37gA7FZJ69L181wBHTZzqU+/edkcKndtAqDiXx+h0AYQ/OSLKINCsGecwfTGJEnP8QJEjfCsbxPX/t2nP+vllyna8E/cTie6pk2JGDQIVUgIjoJ8Sg8eInPyJFzllqqe8je7q/s2iEvf75649P3uiUvfhf95IryCbInwCrIlwivIlgivIFsivIJsifAKsiXCK8iWCK8gWyK8gmyJ8AqyJcIryJYIryBbIryCbImtrATZEjOvIFsivIJsifAKsiXCK8iWCK8gWyK8gmyJ8AqyJcIryJYIryBb/w/z8rXbFIEhpwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 200x200 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "visualize_2D(A_3D[:,:,0], '三维数组，第1列', 30, -30)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 108,
   "id": "66f4e819-4918-42be-9a26-847c90c963d5",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "-30"
      ]
     },
     "execution_count": 108,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 取出单一元素\n",
    "A_3D[0, 0, 0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 109,
   "id": "e35c3166-8876-428b-9d5b-ba95c625bb25",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-30])"
      ]
     },
     "execution_count": 109,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_3D[[0], [0], [0]]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 110,
   "id": "47919a19-2186-4cdd-bb15-00fd7c2e22cb",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-15, -14, -13, -12, -11])"
      ]
     },
     "execution_count": 110,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_3D[0, -1, :]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 111,
   "id": "c92bfdce-1e12-403b-b3c6-1903c759de07",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-25, -24, -23, -22, -21])"
      ]
     },
     "execution_count": 111,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_3D[0, 1, :]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 112,
   "id": "dccb9295-b02e-4647-b0bd-9d3c461e422b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-10,  -9,  -8,  -7,  -6],\n",
       "       [ -5,  -4,  -3,  -2,  -1],\n",
       "       [  0,   1,   2,   3,   4],\n",
       "       [  5,   6,   7,   8,   9]])"
      ]
     },
     "execution_count": 112,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 使用省略号\n",
    "A_3D[1,...]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 113,
   "id": "e7c90b81-2547-4f55-9252-44d47dcacf84",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-29, -24, -19, -14],\n",
       "       [ -9,  -4,   1,   6],\n",
       "       [ 11,  16,  21,  26]])"
      ]
     },
     "execution_count": 113,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A_3D[...,1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 114,
   "id": "14556054-a39c-4177-b93f-4db47d5a0b71",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[[-30, -29, -28, -27, -26],\n",
       "        [-20, -19, -18, -17, -16]],\n",
       "\n",
       "       [[-10,  -9,  -8,  -7,  -6],\n",
       "        [  0,   1,   2,   3,   4]],\n",
       "\n",
       "       [[ 10,  11,  12,  13,  14],\n",
       "        [ 20,  21,  22,  23,  24]]])"
      ]
     },
     "execution_count": 114,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 使用take\n",
    "np.take(A_3D, [0,2], axis=1)\n",
    "# copy or view?"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d9d1078b-98c9-4b26-b601-53f24de72573",
   "metadata": {},
   "source": [
    "## 参考阅读"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8601e7d1-241b-4fbf-9596-82148a9f91ca",
   "metadata": {},
   "source": [
    "更多有关NumPy索引和切片，请参考：  \n",
    "https://numpy.org/doc/stable/user/how-to-index.html  \n",
    "https://numpy.org/doc/stable/user/basics.indexing.html"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 115,
   "id": "2a76d332-aee9-4e69-b1d7-20b5eac340a5",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Repo: https://github.com/Visualize-ML\n",
    "# Book 1 Python for Beginners  |  From Basic Arithmetic to Machine Learning\n",
    "# Published and copyrighted by Tsinghua University Press\n",
    "# Beijing, China, 2023"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
